﻿<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:template match="/">
    <!-- BUILD MENU BAR -->
    <div id="prime-nav">
      <ul>
        <xsl:for-each select="//TOPICS">
          <li>
            <a>
              <xsl:attribute name="href">
                <xsl:value-of select="@URL" />
              </xsl:attribute>
              <img>
                <xsl:attribute name="id" >tdMenuBarItem<xsl:value-of select="@TYPE" />
                </xsl:attribute>
                <xsl:attribute name="src" >
                  <xsl:value-of select="@IMAGE" />
                </xsl:attribute>
                <xsl:attribute name="height" >
                  <xsl:value-of select="@HEIGHT" />
                </xsl:attribute>
                <xsl:attribute name="width" >
                  <xsl:value-of select="@WIDTH" />
                </xsl:attribute>
                <xsl:attribute name="alt" >
                  <xsl:value-of select="@ALT" />
                </xsl:attribute>
                <xsl:attribute name="class" >clsMenuBarItem</xsl:attribute>
              </img>
            </a>
          </li>
        </xsl:for-each>
      </ul>
    </div>

    <!-- BUILD INDIVIDUAL MENUS -->
    <ul id="udm" class="udm">
      <xsl:for-each select="//TOPICS[TOPIC]">
        <li>
          <xsl:attribute name="ID">divMenu<xsl:value-of select="@TYPE"/>
          </xsl:attribute>
          <a href="#"></a>
          <ul>
            <xsl:for-each select="TOPIC">
              <li>
                <a>
                  <xsl:attribute name="HREF">
                    <xsl:value-of select="URL" />
                  </xsl:attribute>
                  <xsl:value-of select="TITLE" />
                </a>
              </li>
            </xsl:for-each>
          </ul>
        </li>
      </xsl:for-each>
    </ul>
    <script type="text/javascript" src="/Scripts/udm-dom.js"></script>
  </xsl:template>

</xsl:stylesheet>

